# from selenium import webdriver
# from selenium.webdriver.common.by import By
#
# driver = webdriver.Chrome()
# driver.get('https://www.baidu.com')
# # 查找一个ID定位
# id = driver.find_element(By.ID, 'kw')
# print(id)
# print(id.get_attribute('outerHTML'))
# driver.quit()
from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get('https://www.baidu.com')
print(driver.find_element(By.ID, 'kw').get_attribute('outerHTML'))
driver.quit()


